package com.entities;

import org.json.JSONException;
import org.json.JSONObject;



public class PlayerDetailed extends Player {
	private static final String ITEM_0 = "item_0";
	private static final String ITEM_1 = "item_1";
	private static final String ITEM_2 = "item_2";
	private static final String ITEM_3 = "item_3";
	private static final String ITEM_4 = "item_4";
	private static final String ITEM_5 = "item_5";
	private static final String KILLS = "kills";
	private static final String DEATHS = "deaths";
	private static final String ASSISTIS = "assists";
	private static final String LEAVER_STATUS = "leaver_status";
	private static final String GOLD = "gold";
	private static final String LAST_HITS = "last_hits";
	private static final String DENIES = "denies";
	private static final String GPM = "gold_per_min";
	private static final String XMP = "xp_per_min";
	private static final String GOLD_SPENT = "gold_spent";
	private static final String HERO_DAMAGE = "hero_damage";
	private static final String TOWER_DAMEGE = "tower_damage";
	private static final String HERO_HEALING = "hero_healing";
	private static final String LEVEL = "level";
	
	private int item_0;
	private int item_1;
	private int item_2;
	private int item_3;
	private int item_4;
	private int item_5;
	private int kills;
	private int deaths;
	private int assists;
	private int leaver_status;
	private int gold;
	private int last_hits;
	private int denies;
	private int gpm;
	private int xpm;
	private int gold_spent;
	private int hero_damage;
	private int tower_damage;
	private int hero_healing;
	private int level;
	
	
	
	public PlayerDetailed(Player player, JSONObject json) {
		super(player.getAccount_id(), player.getPlayer_slot(), player.getHero_id());
		try {
			this.item_0 = json.getInt(ITEM_0);
			this.item_1 = json.getInt(ITEM_1);
			this.item_2 = json.getInt(ITEM_2);
			this.item_3 = json.getInt(ITEM_3);
			this.item_4 = json.getInt(ITEM_4);
			this.item_5 = json.getInt(ITEM_5);
			this.kills =  json.getInt(KILLS);
			this.deaths =  json.getInt(DEATHS);
			this.assists =  json.getInt(ASSISTIS);
			this.leaver_status=  json.getInt(LEAVER_STATUS);
			this.gold=  json.getInt(GOLD);
			this.last_hits =  json.getInt(LAST_HITS);
			this.denies =  json.getInt(DENIES);
			this.gpm =  json.getInt(GPM);
			this.xpm =  json.getInt(XMP);
			this.gold_spent =  json.getInt(GOLD_SPENT);
			this.hero_damage =  json.getInt(HERO_DAMAGE);
			this.tower_damage =  json.getInt(TOWER_DAMEGE);
			this.hero_healing =  json.getInt(HERO_HEALING);
			this.level =  json.getInt(LEVEL);
			
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public int getItem_0() {
		return item_0;
	}

	public int getItem_1() {
		return item_1;
	}

	public int getItem_2() {
		return item_2;
	}

	public int getItem_3() {
		return item_3;
	}

	public int getItem_4() {
		return item_4;
	}

	public int getItem_5() {
		return item_5;
	}

	public int getKills() {
		return kills;
	}

	public int getDeaths() {
		return deaths;
	}

	public int getAssists() {
		return assists;
	}

	public int getLeaver_status() {
		return leaver_status;
	}

	public int getGold() {
		return gold;
	}

	public int getLast_hits() {
		return last_hits;
	}

	public int getDenies() {
		return denies;
	}


	public int getGold_spent() {
		return gold_spent;
	}

	public int getHero_damage() {
		return hero_damage;
	}

	public int getTower_damage() {
		return tower_damage;
	}

	public int getHero_healing() {
		return hero_healing;
	}

	public int getLevel() {
		return level;
	}

	public int getGpm() {
		return gpm;
	}

	public int getXpm() {
		return xpm;
	}

}
